Skip to content

Conversation

@ElektroKill
Copy link
Contributor

This PR fixes a potential infinite loop that could occur when a custom IAssemblyResolver implementation calls TryGetOriginalTargetFrameworkAttribute on the source module. If this method encounters a generic attribute, upon resolving its name, it will call the MemberRef constructor, which will call ResolveTypeDef, which can create an infinite loop and lead to a stack overflow.

Since the TargetFrameworkAttribute is not generic, a simple and easy fix is to just skip the processing of all attributes that are generic using the same condition as used in the MemberRef constructor to prevent the ResolveTypeDef call.

@wtfsck wtfsck merged commit b3060d8 into 0xd4d:master Sep 3, 2025
2 checks passed
@wtfsck
Copy link
Contributor

wtfsck commented Sep 3, 2025

Thanks, merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants